package com.qf.mvc2202.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/redirect")
public class RedirectController {
    @RequestMapping("/test1")
    public String testRedirect1(){
        System.out.println("test redirect1");
        return "redirect:/redirect/test2";//绝对路径
    }
    @RequestMapping("/test2")
    public String testRedirect2(){
        System.out.println("test redirect2");
        return "redirect:/view/user.jsp";
    }

}
